test fixtures: improve forkchoice construction#398
Merged
tcoratger merged 3 commits intoleanEthereum:mainfrom Feb 14, 2026
Merged
test fixtures: improve forkchoice construction#398tcoratger merged 3 commits intoleanEthereum:mainfrom
tcoratger merged 3 commits intoleanEthereum:mainfrom
Conversation
fselmo
approved these changes
Feb 13, 2026
unnawut
approved these changes
Feb 14, 2026
Collaborator
unnawut
left a comment
There was a problem hiding this comment.
yeah moving away from manual constructions is great, just one comment on readability
| - Test files/functions must start with `test_` | ||
| - **No example code in docstrings**: Do not include `Example:` sections with code blocks in docstrings. Keep documentation concise and focused on explaining *what* and *why*, not *how to use*. Unit tests serve as usage examples. | ||
| - **No section separator comments**: Never use banner-style separator comments (`# ====...`, `# ----...`, or similar). They add visual clutter with no value. Use blank lines to separate logical sections. If a section needs a heading, a single `#` comment line is enough. | ||
| - **CRITICAL - Preserve existing documentation**: When refactoring or modifying code, NEVER remove or rewrite existing comments and docstrings unless they are directly invalidated by the code change. Removing documentation that still applies creates unnecessary noise in code review diffs and destroys context that was carefully written. Only modify documentation when: |
Collaborator
There was a problem hiding this comment.
yeah this has been quite annoying so far
packages/testing/src/consensus_testing/test_fixtures/fork_choice.py
Outdated
Show resolved
Hide resolved
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🗒️ Description
In the test fixtures, I've tried to refactor a bit in order to use more the spec directly instead of manual constructions.
🔗 Related Issues or PRs
✅ Checklist
toxchecks to avoid unnecessary CI fails:uvx tox